package panic

import "fmt"

func Pain() {
	a()
	defer func() {
		if error := recover(); error != nil {
			fmt.Println("recover")
		}
	}()
	b()
	fmt.Println("main after b")
}

func a() {
	fmt.Println("func a")
}

func b() {
	panic("func b")
	fmt.Println("func b after panic")
}
